function d(x, y, rotation){
    rotation = rotation * Math.PI / 180
    let nx = Math.cos(rotation) * x + Math.sin(rotation) * y
    let ny = Math.cos(rotation) * y - Math.sin(rotation) * x
    return {nx, ny}
}
function test()
{
    for(let i = 0; i <= 360; i += 5){
        console.log(d(10,10,i))
    }
}
test()